package com.tedu.springboot2302.controller;

import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;

public class ArticleController {
    private static File Art;

    static {
        Art =new File("./articles");
        if(!Art.exists()){
            Art.mkdirs();
        }
    }


    public void send(HttpServletRequest request,HttpServletResponse response){
        System.out.println("开始处理发表文章...");
        String title=request.getParameter("title");
        String author=request.getParameter("author");
        String content=request.getParameter("content");
        if(title == null || title.isEmpty()||
        author == null || author.isEmpty() ||
        content == null || content.isEmpty()){

        }
    }
}
